﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Microsoft.Reporting.WebForms;

namespace Catering.Catering_Page.JieGouJianKong
{
    public partial class EdibleStatistics_ListPgae : System.Web.UI.Page
    {
        // 属性注入
        Catering_Rules.ViewOperaction viewOperaction = new Catering_Rules.ViewOperaction();

        // 页面 Load 事件
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                // 报表的数据源
                ReportDataSource rds = new ReportDataSource("DataSet1", viewOperaction.GetView_EdibleStatistics_ListToDataSet ().Tables[0]);

                // 先清除报表数据源
                ReportViewer1.LocalReport.DataSources.Clear();

                // 绑定数据源
                ReportViewer1.LocalReport.DataSources.Add(rds);

                // 呈现出数据
                ReportViewer1.LocalReport.Refresh();
            }
        }
    }
}